﻿@{
	string FlowID = Request.QueryString["flowid"];
	string StepID = Request.QueryString["stepid"];
	string GroupID = Request.QueryString["groupid"];
	string TaskID = Request.QueryString["taskid"];
	string InstanceID = Request.QueryString["instanceid"];
	string DisplayModel = Request.QueryString["display"] ?? "0";
	string DBConnID = "06075250-30dc-4d32-bf97-e922cb30fac8";
	string DBTable = "OaWeekSummaryList";
	string DBTablePK = "ID";
	string DBTableTitle = "";
	if(InstanceID.IsNullOrEmpty()){InstanceID = Request.QueryString["instanceid1"];}
	YJ.Platform.Dictionary BDictionary = new YJ.Platform.Dictionary();
	YJ.Platform.WorkFlow BWorkFlow = new YJ.Platform.WorkFlow();
	YJ.Platform.WorkFlowTask BWorkFlowTask = new YJ.Platform.WorkFlowTask();
	string fieldStatus = BWorkFlow.GetFieldStatus(FlowID, StepID);
	LitJson.JsonData initData = BWorkFlow.GetFormData(DBConnID, DBTable, DBTablePK, InstanceID, fieldStatus, "{}");
	string TaskTitle = BWorkFlow.GetFromFieldData(initData, DBTable, DBTableTitle);
}
<link href="~/Scripts/FlowRun/Forms/flowform.css" rel="stylesheet" type="text/css" />
<script src="~/Scripts/FlowRun/Forms/common.js" type="text/javascript" ></script>
<input type="hidden" id="Form_ValidateAlertType" name="Form_ValidateAlertType" value="1" />
<input type="hidden" id="OaWeekSummaryList." name="OaWeekSummaryList." value="@(TaskTitle.IsNullOrEmpty() ? BWorkFlow.GetAutoTaskTitle(FlowID, StepID, Request.QueryString["groupid"]) : TaskTitle)" />
<input type="hidden" id="Form_TitleField" name="Form_TitleField" value="OaWeekSummaryList." />
<input type="hidden" id="Form_DBConnID" name="Form_DBConnID" value="06075250-30dc-4d32-bf97-e922cb30fac8" />
<input type="hidden" id="Form_DBTable" name="Form_DBTable" value="OaWeekSummaryList" />
<input type="hidden" id="Form_DBTablePk" name="Form_DBTablePk" value="ID" />
<input type="hidden" id="Form_DBTableTitle" name="Form_DBTableTitle" value="" />
<input type="hidden" id="Form_AutoSaveData" name="Form_AutoSaveData" value="1" />
<textarea id="Form_DBTableTitleExpression" name="Form_DBTableTitleExpression" style="display:none;width:0;height:0;"></textarea>
<script type="text/javascript">
	var initData = @Html.Raw(BWorkFlow.GetFormDataJsonString(initData));
	var fieldStatus = "1"=="@Request.QueryString["isreadonly"]" ? {} : @Html.Raw(fieldStatus);
	var displayModel = '@DisplayModel';
	$(window).load(function (){
		formrun.initData(initData, "OaWeekSummaryList", fieldStatus, displayModel);
	});
</script>
<p><br/></p><p><br/></p><link href="~/Content/Theme/tablenew.css" rel="stylesheet"/><p><br/></p><script type="text/javascript">$(window).load(function() {
    var a = true;
    while (a) {
        if (document.getElementById("OaWeekSummaryList.weekno")) {
            var index =document.getElementById("OaWeekSummaryList.weekno").selectedIndex;
            var value =document.getElementById("OaWeekSummaryList.weekno").options[index].value;
            if(value >1){
              return;
            }
            a = false;
            $.ajax({
                type: "Get",
                url: '/api/ConferenceRoom/selectToDayViewWeek/',
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function(data) {
                    if (data != null && data.data.length >0) {
                        var index = data.data[0].WeekNumberOfYear;
                        index++;
                        for (var i = 0; i < document.getElementById("OaWeekSummaryList.weekno").options.length; i++) {
                            if (document.getElementById("OaWeekSummaryList.weekno").options[i].value == index) {
                                document.getElementById("OaWeekSummaryList.weekno").options[i].selected = true;
                                break;
                            }
                        }
                    }
                },
                error: function(XMLHttpRequest, textStatus, errorThrown) {
                    //请求出错处理
                    alert("处理失败");
                }
            });

        };
    }
});</script><style>.tableF textarea{height:80px !important;}</style><table class="flowformtable tableF table table-bordered" data-sort="sortDisabled" cellspacing="1" cellpadding="0"><tbody><tr class="firstRow"><th class="title" style="word-break: break-all;" colspan="2" valign="middle" align="center">周计划录入</th></tr><tr><th class="titleT" colspan="2" valign="middle" align="left"><p class="titleO">基本信息</p></th></tr><tr class="firstRow"><td class="top" style="word-break: break-all;" valign="middle"><p class="txt">周次</p><select class="myselect" id="OaWeekSummaryList.weekno" name="OaWeekSummaryList.weekno" style="width:65%" isflow="1" type1="flow_select">@Html.Raw(new YJ.Platform.WorkFlowForm().GetOptionsFromSql("06075250-30dc-4d32-bf97-e922cb30fac8", "select * from View_week order by value", ""))</select></td><td class="top" style="word-break: break-all;" valign="middle"><p class="txt">姓名</p><input type="text" type1="flow_org" id="OaWeekSummaryList.userid" name="OaWeekSummaryList.userid" value="u_@YJ.Platform.Users.CurrentUserID.ToString()" more="1" isflow="1" class="mymember" title="" dept="0" station="0" user="1" workgroup="0" unit="0" rootid=""/></td></tr><tr><td style="word-break: break-all;" colspan="2" valign="middle"><p class="txt">计划内容</p><textarea isflow="1" type1="flow_textarea" id="OaWeekSummaryList.describe" name="OaWeekSummaryList.describe" class="mytext" style="height:80px"></textarea></td></tr><tr><td class="bottom" style="word-break: break-all;" colspan="2" valign="top"><span class="txt">说明：此申请表用于录入周计划内容。</span></td></tr></tbody></table><p><input type="hidden" id="OaWeekSummaryList.type" name="OaWeekSummaryList.type" isflow="1" type1="flow_hidden" value="1"/> </p>